package com.buybuyyi.stylistcrm.security.rest;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;
import stylistcrm.core.services.security.dto.UserDto;

import java.util.Collection;

/**
 * Created by yanwc on 2016/9/21.
 */
public class DefaultUserDetails extends User {
    public UserDto getUserDto() {
        return userDto;
    }

    public void setUserDto(UserDto userDto) {
        this.userDto = userDto;
    }

    private UserDto userDto;

    public DefaultUserDetails(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public DefaultUserDetails(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }

    private String salt;

    public String getSalt() {
        return null;
    }
}
